const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({
  username: {
    type: String,
    required: true
  },
  email: {
    type: String,
    required: true
  },
  password: {
    type: String,
    required: true
  },
  date: {
    type: Date,
    required: true,
    // default: Date.now(),
    default: Date.now() + 8 * 60 * 60 * 1000,
  },
})

const User = mongoose.model('User', userSchema);

module.exports = User;